﻿@page
@{ Layout = "_Layout"; }

<div style="height: 10px;"></div>

<el-alert type="info">
  请进入微博开放平台（https://open.weibo.com/） - 我的应用 - 部署微连接 - 微博登录 获取App Key及App Secret
</el-alert>

<div style="height: 10px;"></div>

<el-form ref="form" :model="form" size="small" status-icon label-width="260px">

  <el-form-item label="是否启用微博登录">
    <el-radio v-model="form.isWeibo" :label="true">启用</el-radio>
    <el-radio v-model="form.isWeibo" :label="false">不启用</el-radio>
  </el-form-item>
  <el-form-item v-if="form.isWeibo" label="App Key" prop="weiboAppKey" :rules="{ required: true, message: '请输入App Key' }">
    <el-input v-model="form.weiboAppKey"></el-input>
  </el-form-item>
  <el-form-item v-if="form.isWeibo" label="App Secret" prop="weiboAppSecret" :rules="{ required: true, message: '请输入App Secret' }">
    <el-input v-model="form.weiboAppSecret"></el-input>
  </el-form-item>

</el-form>

<el-divider></el-divider>
<div style="height: 10px"></div>

<el-row>
  <el-col :span="24" align="center">
    <el-button type="primary" v-on:click="btnSubmitClick" size="small">保 存</el-button>
    <el-button v-if="url" type="primary" v-on:click="btnTestClick" size="small">测 试</el-button>
  </el-col>
</el-row>

@section Scripts{
  <script src="/assets/login/js/connectWeibo.js" type="text/javascript"></script>
}
